package com.qf.efserver.alarm.controller;

import com.qf.common.core.common.R;
import com.qf.efserver.alarm.param.AlarmParam;
import com.qf.efserver.alarm.service.AlarmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/alarm")
public class AlarmController {

    @Autowired
    private AlarmService alarmService;

    @PostMapping("/add")
    public R  addAlarm(@RequestBody AlarmParam param){

        alarmService.addAlarm(param);
        return R.ok("闹钟设置成功");
    }

}
